package com.elinkway.infinitemovies.ui.activity;

import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.widget.GridLayoutManager;

import com.elinkway.infinitemovies.adapter.AlbumShowAdapter;
import com.elinkway.infinitemovies.async.RequestHomePageTask;
import com.elinkway.infinitemovies.ui.fragment.HomeTestFragment;
import com.le123.ysdq.R;
import com.umeng.analytics.MobclickAgent;

public class MyDatabindingActivity extends BaseSecondaryActivity {
	public static final String TAG = "MyDatabindingActivity";

	private RequestHomePageTask homePageTask;
	private GridLayoutManager mGridLayoutManager;
	private AlbumShowAdapter mAdapter;

	private static final int ONE_COLUMN = 1;
	private static final int TWO_COLUMN = 2;
	private static final int THREE_COLUMN = 3;
	private static final int ALL_COLUMN = 6;

	private HomeTestFragment mHomeTestFragment;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		super.setActionBarActivityClassName(TAG);
		initActionBar();
		setContentView(R.layout.test_databinding_activity);
		FragmentManager fm = getSupportFragmentManager();
		FragmentTransaction transaction = fm.beginTransaction();
		mHomeTestFragment = new HomeTestFragment();
		transaction.add(R.id.rl_test_home_fragment, mHomeTestFragment);
		transaction.commit();
	}

	@Override
	protected void initActionBar(){
		super.initActionBar();
		mTitleTv.setText("关于我们");
	}

	@Override
	protected void onPause() {
		super.onPause();
		MobclickAgent.onPause(this);
	}

	@Override
	protected void onResume() {
		super.onResume();
		MobclickAgent.onResume(this);
	}

}
